package com.show.mytest;

public class Test03_Notify {
    public static void main(String[] args) {
        // 创建一个Resource对象
        Resource r = new Resource();
        // 创建两个线程传入不同的Runnable实现类
        Thread pt = new Thread(new ProductThread(r));
        Thread ct = new Thread(new ConsumeThread(r));
        // 开启线程
        pt.start();
        ct.start();
    }
}
